//
//  Common.swift
//  weibo
//
//  Created by yellow on 15/10/18.
//  Copyright © 2015年 yellow. All rights reserved.
//

import UIKit

//该文件类似于oc中的pch文件，设置全局属性或是方法

let themeColor = UIColor.orangeColor()


//以下为定义通知的name
/// 跳转控制器通知
let jump2MainVCNotification = "jump2MainVCNotification"

/// 配图cell点击通知
let StatusPictureViewCellSelectedNotification = "StatusPictureViewCellSelectedNotification"
/// 通知传递的字典中的key -- 选中的indexPath
let StatusPictureViewCellSelectedIndexPathKey = "StatusPictureViewCellSelectedIndexPathKey"
/// 通知传递的字典中的key -- 微博配图的urls
let StatusPictureViewCellSelectedURLKey = "StatusPictureViewCellSelectedURLKey"


//指定延迟秒速，执行闭包
/**
NSEC：纳秒
USEC：微妙
SEC：秒
PER：每
*/
func delayDo(second:Double,call:()->()){
    let delay = dispatch_time(DISPATCH_TIME_NOW, Int64(second * Double(NSEC_PER_SEC)))
    dispatch_after(delay, dispatch_get_main_queue()) { () -> Void in
        call()
    }
}

